package ua.eug.tst2;

import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.Actor;

public class ChipActor extends Actor {
	Chip chip;
	TextureRegion texture;
	float actorX = 5, actorY = 5;
    
    public ChipActor(Chip chip) {
    	this.chip = chip;
    	
    	texture = AssetLoad.findRegion(chip.getTextureRegion());
    	setBounds(actorX,actorY,texture.getRegionWidth(),texture.getRegionHeight());
//        addListener(new ActorGestureListener(){
//			public void pan (InputEvent event, float x, float y, float deltaX, float deltaY) {
//				event.getTarget().moveBy(deltaX, deltaY);
//				System.out.println("panning ca " + deltaX + ", " + deltaY + " " + event.getTarget());
//			}
//        });
    }

	@Override
    public void draw(Batch batch, float alpha){
        batch.draw(texture,this.getX(),this.getY());
    }
	
    @Override
    public void act(float delta){

    }
}
